﻿//
// Created: 2018/9/27
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;

namespace Model.WXshopBuiness.Map
{
    internal  class UserProductKanJiaMap:EntityTypeConfiguration< UserProductKanJia >    
    {
        public UserProductKanJiaMap()
        {
             this.ToTable("User_Product_KanJia");
             this.HasKey(i => new { i.KanJiaID,i.ProductID,i.UserID });
             this.Property(i => i.KanJiaID).HasColumnName("KanJiaID");                     
             this.Property(i => i.PromotionID).HasColumnName("PromotionID");                     
             this.Property(i => i.ProductID).HasColumnName("ProductID");                     
             this.Property(i => i.UserID).HasColumnName("UserID");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.DeadLineTime).HasColumnName("DeadLineTime");                     
             this.Property(i => i.MaxKanJiaCount).HasColumnName("MaxKanJiaCount");                     
             this.Property(i => i.KanJiaDesc).HasColumnName("KanJiaDesc");                     
             this.Property(i => i.AlreadKanJiaCount).HasColumnName("AlreadKanJiaCount");                     
             this.Property(i => i.EachKanJiaMaxMoney).HasColumnName("EachKanJiaMaxMoney");                     
             this.Property(i => i.MaxKanJiaMoney).HasColumnName("MaxKanJiaMoney");
             this.Property(i => i.AleradKanJiaMoney).HasColumnName("AleradKanJiaMoney");
             this.Property(i => i.IsUsed).HasColumnName("IsUsed");
             this.Property(i => i.OrderId).HasColumnName("OrderId");
            this.Property(i => i.UserName).HasColumnName("UserName");
        }   
    }
    
     public static class UserProductKanJiaMapExtensions
    {
        public static void UserUserProductKanJiaMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new UserProductKanJiaMap());
        }
    }
}